package br.com.cicero.designpatterns.command.absfactory;

import br.com.cicero.designpatterns.command.BaseCommand;
import br.com.cicero.designpatterns.factory.EnviarPorEmail;
import br.com.cicero.designpatterns.factory.GerarPDF;

/**
 * abstract factory estatico
 * @author cicero
 *
 */
public class CommandFactory1 implements CommandFactory {

	public BaseCommand create(String name) {
		
		BaseCommand command = null;
		
		if (name.equals("EnviarPedido")) {
			
			command = new EnviarPorEmail();
			
		} else if (name.equals("GerarPDF")) {
			
			command = new GerarPDF();
						
		}
				
		return command;
	}

}
